import 'package:azlistview/azlistview.dart';
import 'package:library_base/entities/generated/json/base/json_field.dart';
import 'package:library_base/entities/generated/json/shipper_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class ShipperEntity extends ISuspensionBean {
  late String createTime;
  late String updateTime;
  late String creator;
  late String updater;
  late String deleted;
  late String tenantId;
  late String id;
  String? provinceId;
  String? cityId;
  String? areaId;
  String? villageId;
  late String addr;
  late String shipperCode;
  late String shipperName;
  late String contact;
  late String mobile;

  String? tagIndex;
  String? namePinyin;
  bool isSelect = false;

  ShipperEntity();

  factory ShipperEntity.fromJson(Map<String, dynamic> json) => $ShipperEntityFromJson(json);

  Map<String, dynamic> toJson() => $ShipperEntityToJson(this);

  @override
  String getSuspensionTag() => tagIndex!;

  @override
  String toString() => json.encode(this);

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is ShipperEntity && shipperName == other.shipperName && id == other.id;

  @override
  int get hashCode => id.hashCode;
}
